    <div class="container">
      <div class="bg-putih">

        <div class="jdl-page">
          <?php echo isset($judul)?$judul:'<font color="#ccc">Judul Belum Diberikan</font>'; ?>
          <div class="clearfix"></div>
        </div>
        
        <?php echo display_flash(); ?>

        <div class="row">
          <div class="col-xs-8">
            <div class="btn-group btn-group-sm" role="group">
              <a href="<?php echo site_url('pasien_data/add'); ?>" class="btn btn-primary"><i class="fa fa-plus"></i>&nbsp;Tambah</a>
              <?php if($this->uri->segment(2) == "search"): ?>
                <?php $keyword = $this->session->userdata('keyword'); ?>
                <a href="<?php echo site_url("pasien_data/excel/$keyword"); ?>" class="btn btn-warning"><i class="fa fa-file-excel-o"></i>&nbsp;Unduh Excel</a>
              <?php elseif($this->uri->segment(2) == ""): ?>
                <a href="<?php echo site_url('pasien_data/excel'); ?>" class="btn btn-warning"><i class="fa fa-file-excel-o"></i>&nbsp;Unduh Excel</a>
              <?php endif; ?>
            </div>
          </div>
          <div class="col-xs-4">
            <?php echo form_open('pasien_data/search'); ?>
            <div class="input-group input-group-sm">
              <input type="text" name="keyword" value="<?=$this->session->userdata('keyword');?>" class="form-control" placeholder="Cari nama pasien..." title="Masukkan kata kunci" style="border-right:none;">
              <span class="input-group-btn">
                <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-search"></span></button>
              </span>
            </div>
            <?php echo form_close(); ?>
          </div>
        </div>

        <table class="table table-striped table-hover margintop20">
          <thead>
            <tr>
              <th width="3%" style="text-align:center;">No</th>
              <th width="12%">Kode Pasien</th>
              <th width="20%">Nama Pasien</th>
              <th width="15%">Tanggal Lahir</th>
              <th>JK</th>
              <th width="13%">Telpon</th>
              <th>Alamat</th>
            </tr>
          </thead>
          <tbody>
            <?php 
              if(!empty($results)){
                foreach ($results as $row) {
            ?>
            <tr>
              <td align="center"><?php echo $ordinal_num++ ?></td>
              <td><?php echo $row['KdPasien']?></td>
              <td><?php echo $row['Nama']?></td>
              <td>
                  <?php echo id_date($row['TanggalLahir'],'long')?>
              </td>
              <td><?php echo $row['JKel']?></td>
              <td><?php echo $row['Telp']?></td>
              <td>
                <?php echo trim_text($row['Alamat'], 50)?>
                <span class="pull-right">
                  <a href="<?php echo site_url('data_riwayat_pasien/show/'. $row['KdPasien']) ?>" class="label label-warning">Riwayat Pasien</a>
                  <a href="<?php echo site_url('pasien_data/edit/' . $row['KdPasien']) ?>" class="label label-success" title="Edit">Edit</a>
                  <a href="<?php echo site_url('pasien_data/delete/' . $row['KdPasien']) ?>" class="label label-default" title="Hapus" onClick="return confirm('Yakin ingin menghapus <?php echo $row['Nama']?> ?')">Hapus</a>
                </span>
              </td>

            </tr>
            <?php 
                }
              }else{
            ?>
            <tr>
              <td colspan="7" align="center">Tidak ada data</td>
            </tr>
            <?php
              }
            ?>
          </tbody>
        </table>

        <center style="margin-top:-30px;">
          <ul class="pagination">
            <?php echo $pagination; ?>
          </ul>
        </center>

        <div class="clearfix"></div>
      </div>
    </div> <!-- /container -->